//统计某字符的个数(字符数组)
#include<stdio.h>
#include<string.h>
int main()
{
        int count, i, sz;
        count = i = 0;
        char* arr[] = {"good boy","you are a bad girl","beautiful girl"};
        sz = sizeof(arr) / sizeof(arr[0]);
        for (; i < sz; i++) {
               char* tmp = strchr(arr[i], 'i');
               while (tmp) {
                       count++;
                       tmp = strchr(tmp + 1, 'i');
               }
        }
        printf("%d\n", count);
        return 0;
}